home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / dhrgcd.zip / DHRGCD.DOC < prev    next >
Text File  |  1992-07-01  |  13KB  |  489 lines

  1.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  2.  
  3.  
  4.  
  5.                   DHRGCD - Global Change Directory Command
  6.                            Version 1.01
  7.                            for OS/2 2.0
  8.                            June 22, 1992
  9.                            Author - Dennis H. Rosenthal
  10.  
  11.  
  12.         Description:        ____________
  13.  
  14.         The DHRGCD.CMD REXX command file implements a command line direc-
  15.         tory change function across all accessible hard disks on your PC.
  16.         This is similar to the Peter Norton NCD DOS command (without
  17.         graphics) but provides a single index for all hard disks.
  18.  
  19.         To initialize the directory index (DIRINFO.GCD), use -
  20.  
  21.         DHRGCD /r [search_disk_options]
  22.            or
  23.         DHRGCD /rq [search_disk_options]
  24.  
  25.         The option /r will build the index and display all directories
  26.         found. The option /rq will build the index without the display of
  27.         directories (quietly). The optional search_disk_options may be
  28.         used to override the default of all accessible hard disks known
  29.         to OS/2. To build an index only for disks D & E enter -
  30.  
  31.         DHRGCD /rq DE
  32.  
  33.         The /r or /rq option should be used whenever directories are
  34.         added or deleted to synchronize the index with the actual cont-
  35.         ents of the hard disk.
  36.  
  37.  
  38.         To jump to another directory on the current disk or on another
  39.         disk, just enter the directory name as the first parameter -
  40.  
  41.         DHRGCD dll
  42.  
  43.         will change to the directory ...\...DLL... found on any disk
  44.         searched when the index was created. The search for directory
  45.         name will only be successful if it appears as part of the last
  46.         qualifier of a directory in whole or part. The specification of
  47.         DLL will match
  48.  
  49.            \ABC\DEF\DLL1
  50.            \ABC\123DLL
  51.            \DLL
  52.  
  53.         but not
  54.  
  55.            \DLL1\ABC
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                         1
  62.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  63.  
  64.  
  65.         If multiple destinations are possible, a selection list will be
  66.         displayed -
  67.  
  68.            There are multiple possibilities -
  69.             1 \ABC\DEF\DLL1
  70.             2 \ABC\123DLL
  71.             3 \DLL
  72.            Enter Selection Number, 0 for No Change, or Just Press Enter
  73.         for Item 3
  74.  
  75.         This will be repeated until a number in the range 0 to 3 is
  76.         entered. If an exact match is found, it will be used as the
  77.         default for the enter key. If multiple exact matches are found,
  78.         the last one will be the default for the enter key.
  79.  
  80.  
  81.         Directories containing spaces may also be matched by using the
  82.         double quote (") character around the directory -
  83.  
  84.            DHRGCD "A B C"
  85.  
  86.  
  87.         To restrict the change to the present disk, use the option
  88.           /l
  89.  
  90.         Example -
  91.           DHRGCD /l DLL
  92.  
  93.         will show directories that match DLL only on the current disk.
  94.  
  95.  
  96.         The index file (DIRINFO.GCD) is an ASCII CR/LF delimited file
  97.         that may be viewed with any editor. It will contain all directo-
  98.         ries that exist on the disks selected for indexing. The index
  99.         will be placed in the root directory of the boot disk. The desti-
  100.         nation may be changed if desired.
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.                                         2
  123.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  124.  
  125.  
  126.  
  127.         Installation:        _____________
  128.  
  129.         The file DHRRU100.DLL must be placed in a directory that is
  130.         specified in the LIBPATH statement in your CONFIG.SYS. After OS/2
  131.         installation the LIBPATH usually contains at least d:\OS2\DLL and
  132.         d:\OS2\APPS\DLL (where d: is the installation drive). It may be
  133.         placed in either of these directories or any other directory in
  134.         the LIBPATH statement.
  135.  
  136.         The file DHRGCD.CMD must be placed in a directory that is speci-
  137.         fied in the SET PATH statement in your CONFIG.SYS. After OS/2 in-
  138.         stallation the SET PATH usually contains at least d:\OS2 and
  139.         d:\OS2\SYSTEM (where d: is the installation drive). It may be
  140.         placed in either of these directories or any other directory in
  141.         the SET PATH statement.
  142.  
  143.         The file DHRGCD.INF must be placed in a directory that is speci-
  144.         fied in the BOOKSHELF statement in your CONFIG.SYS. After OS/2
  145.         installation the BOOKSHELF usually contains at least d:\OS2\BOOK
  146.         (where d: is the installation drive). It may be placed in that
  147.         directory or in another directory by adding the other directory
  148.         to your BOOKSHELF statement.
  149.  
  150.         This file, DHRGCD.DOC, may be placed anywhere convenient as it is
  151.         not referenced by DHRGCD.CMD.
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.                                         3
  184.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  185.  
  186.  
  187.  
  188.         Errors:        _______
  189.  
  190.         When an error is detected, messages will be displayed and the CMD
  191.         will exit with a non-zero return code. The return codes are -
  192.  
  193.            4 - Help information was displayed
  194.  
  195.            8 - Directory target not found in index
  196.  
  197.           12 - Missing parameters
  198.  
  199.           16 - Invalid option entered
  200.  
  201.           20 - Error changing to directory target - recreate index
  202.  
  203.           24 - No directories found on disk - index file not created
  204.  
  205.           28 - Index file not found - use /r to create index
  206.  
  207.           32 - Error finding DHRRU100 DLL
  208.  
  209.           36 - Error processing DHRRU100 DLL
  210.  
  211.           40 - Error writing to index file
  212.  
  213.           44 - Unable to find a local disk for storage of index file
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.                                         4
  245.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  246.  
  247.  
  248.  
  249.         Customization:        ______________
  250.  
  251.         The DHRGCD.CMD file is a REXX program file which contains source.
  252.         It may be modified with any editor. At the start of the program
  253.         are four REXX variables that control how the program operates.
  254.         The destination of where the index file will be placed may be
  255.         customized by two options. The default is to place the index file
  256.         on the boot disk.
  257.  
  258.         The variable
  259.            use_current_disk_index
  260.         when set to 'Y' will place the index on the disk where the com-
  261.         mand is executed. This will allow a separate index for each hard
  262.         disk. The CMD file is delivered with this set to 'N'.
  263.  
  264.         If use_current_disk_index is not set to 'Y', the variable
  265.            use_boot_disk_index
  266.         when set to 'Y' will place the index on the boot disk. If
  267.         use_current_disk_index is not 'Y' and use_boot_disk_index is also
  268.         not 'Y', the index will be placed on the first local hard disk.
  269.         The CMD file is delivered with this set to 'Y'. This option is
  270.         provided to allow the containment of all OS/2 files on a single
  271.         disk. This CMD was developed on a PC where disk C is a DOS 5 -
  272.         OS/2 1.3 dual boot primary partition, disk D is an OS/2 FAT
  273.         bootable logical partition, and disk I is an OS/2 HPFS bootable
  274.         logical partition on a second physical disk. DHRGCD.CMD will
  275.         search disk D for the index file when booted from disk D and
  276.         search disk I when booted from disk I.
  277.  
  278.         The DHRGCD.CMD file will use the ANSI.SYS control strings to
  279.         adjust display colors. One consequence is that the current colors
  280.         cannot be saved. If changed by the CMD the display will be left
  281.         with a white foreground on a black background. If this is not
  282.         desirable, the use of ANSI control strings may be eliminated by
  283.         setting the variable
  284.            use_ansi_colors
  285.         to 'N'. Or the default exit value (ansi_white) may be changed to
  286.         match the colors you are currently using.
  287.  
  288.         The default disks to be indexed are the combination of local hard
  289.         disks and remote disks known to OS/2 at the time the index re-
  290.         quest is processed. To index only local hard disks, set the value
  291.         of variable
  292.            use_all_disks
  293.         to 'N'.
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.                                         5
  306.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  307.  
  308.  
  309.         The CMD file may be renamed. One suggestion is to rename
  310.         DHRGCD.CMD to GCD.CMD and create a second CMD file called CCD.CMD
  311.         (Current disk Change Directory) that invokes GCD.CMD with the
  312.         '/l' parameter. This would provide global access with GCD and
  313.         current disk only access with CCD. Example -
  314.  
  315.         /* This is a REXX exec */
  316.         parse arg dest
  317.         if left(dest,1) = '/' then do
  318.             say 'Invalid Destination ('dest') - use DHRGCD for options'
  319.             exit 16
  320.         end
  321.         call 'GCD' '/l' dest
  322.         exit result
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.                                         6
  367.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  368.  
  369.  
  370.  
  371.         Disclaimer:        ___________
  372.  
  373.         DHRGCD.CMD and DHRRU100.DLL are distributed as is, with no guar-
  374.         antee that they will work correctly in all situations.  In no
  375.         event will the Author be liable for any damages whatsoever,
  376.         including, without limitation, loss of profit, loss of informa-
  377.         tion, or special, incidental, or consequential damages or other
  378.         similar claims, arising out of the use of or inability to use
  379.         these files, even if the Author has been advised of the possibil-
  380.         ity of such damages, or for any claim by any other party.
  381.  
  382.  
  383.         Copyright:        __________
  384.  
  385.         The files DHRGCD.CMD and DHRRU100.DLL are placed in the public
  386.         domain with the restriction that some parts may have previously
  387.         been copyrighted by others. You may use, redistribute, or modify
  388.         these files without restriction by the Author.
  389.  
  390.  
  391.         Modifications:        ______________
  392.  
  393.         Since this is a REXX command file, the source is available for
  394.         modification by anyone. I would appreciate notification of any
  395.         major modifications or corrections so they may be reviewed for
  396.         inclusion in future versions (if any).
  397.  
  398.         I may be reached via CompuServe ID 75176,3003.
  399.  
  400.         Dennis H. Rosenthal
  401.         June 22, 1992
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.                                         7
  428.         DHRGCD - Global Change Directory Command Version 1.01 for OS/2 2.0
  429.  
  430.  
  431.         DHRRU100 DLL Notes:        ___________________
  432.  
  433.         To determine the OS/2 boot disk, a REXX callable DLL was created
  434.         based on the REXXUTIL DLL. It has a single function that returns
  435.         the information from the OS/2 2.0 DosQuerySysInfo request. The
  436.         DHRGCD.CMD only uses one variable, stem.5, which contains the
  437.         boot disk number. A total of 23 variables will be returned along
  438.         with descriptions. Example (reminder - '/*' must begin in column
  439.         1 on first line of cmd file to invoke REXX processing) -
  440.  
  441.         /* This is a REXX exec */
  442.         /*
  443.         ** Use RxFuncAdd to identify the DLL and register an entry point
  444.         */
  445.         if RxFuncQuery('DHRSysInfo') then
  446.             call RxFuncAdd 'DHRSysInfo','DHRRU100','DHRSysInfo'
  447.         call DHRSysInfo 'infoval', 'infodesc'
  448.         /* On return, RESULT will contain "0" or > "0" */
  449.         if result > 0 then do
  450.             say 'Error in DHRSysInfo, rc =' result
  451.             exit result
  452.         end
  453.         /* infoval.0 contains the count of variables returned */
  454.         say 'Count of variables returned =' infoval.0
  455.         do varnum = 1 to infoval.0
  456.           say left(infodesc.varnum,30) infoval.varnum
  457.         end
  458.         exit
  459.  
  460.         The call to DHRSysInfo requires one REXX stem variable name and
  461.         optionally a second REXX stem variable name. The variable stem.0
  462.         will contain the count of data item returned in stem.1 through
  463.         stem.n. The first variable name is used to return values. The
  464.         second variable name, if supplied, is used to return descriptions
  465.         for the values in the first variable. A result code of 0 indi-
  466.         cates that the function executed correctly. A result code greater
  467.         than zero will indicate a problem with extracting the information
  468.         or storing the information in a REXX variable. An error message
  469.         will be displayed with more specific information. A parameter
  470.         error will produce a severe REXX error and terminate the CMD
  471.         file.
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.                                         8
  489.